package day05;
import java.util.Arrays;
public class ArrayDemo {
    public static void main(String[] args) {
        int[]a=new int[10];
        for (int i=0;i<a.length;i++){
            a[i]=(int)(Math.random()*100);
            System.out.println(a[i]);
        }
        Arrays.sort(a);
        System.out.println("正排序:");
        for (int i=0;i< a.length;i++){
            System.out.println(a[i]);
        }
        System.out.println("倒排序:");
        for (int i=a.length-1;i>=0;i--){
            System.out.println(a[i]);
        }








        /*int[]b=new int[8];
        int []a={9,0,7};
        int[]e=new int[]{3,2,1,};
        boolean[]u={false,true,true};
        double[]i=new double[5];



        a[2]=100;
        System.out.println(b.length);


        for (int r=0;r<b.length;r++){
            System.out.println(b[r]=100);
        }

         */


        /*int[]a=new int[10];
        for (int i=0;i<a.length;i++){
            a[i]=(int) (Math.random()*99);
            System.out.println(a[i]);
        }

         */

    }
}
